package cn.tedu._06article.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

@Data
public class UserArticleParam {
    @Schema(description = "文章标题",required= true)
    @NotBlank(message = "文章标题不能为空")
    private String title;
    @Schema(description = "文章内容",required= true)
    @Pattern(regexp = "^.{10,100}$", message = "文章长度必须在10-100个字符之间")
    private String content;
}
